import request from '@/utils/request'
import {
  renderUrl
} from '../utils'

const headers = {
  'Content-Type': 'application/json'
}

export function add(data) {
  return request({
    url: '/admin/operation/rules/add',
    method: 'POST',
    data: JSON.stringify(data),
    headers
  })
}

export function edit(data) {
  return request({
    url: '/admin/operation/rules/update',
    method: 'POST',
    data: JSON.stringify(data),
    headers
  })
}

export function del(data) {
  return request({
    url: '/admin/operation/rules/del',
    method: 'POST',
    data: JSON.stringify(data),
    headers
  })
}

//使用条款

export function getsysinfo(data) {
    return request({
      url: '/admin/operation/sys/info',
      method: 'POST',
      data: JSON.stringify(data),
      headers
    })
  }
//更新使用条款
export function updatesysinfo(data) {
    return request({
      url: '/admin/operation/sys/update',
      method: 'POST',
      data: JSON.stringify(data),
      headers
    })
  }
  
export default {
  add,
  edit,
  del
}
